<?php
defined ( '_JEXEC' ) or die ( 'Restricted access' );
class Tableerp_timesheet extends JTable {
	var $id = '';
        var $id_user = '';
	var $Time = ''; // khoi tao gia tri
	var $type_in_out = '';
	

	
	function __construct( &$db ) {

		parent::__construct( '#__erp_timesheet', 'id', $db ); // bang nao, khoa chinh la gi

	}



	function bind( $array, $ignore='' )	{

		$result = parent::bind( $array );

		// cast properties

		$this->id	= (int) $this->id;



		return $result;

	}



	function check() {

		return true;

	}



	// overloaded delete function

	function delete( $oid=null ) {

		$k = $this->_tbl_key;

		if ( $oid ) {

			$this->$k = intval( $oid );

		}

		if ( parent::delete( $oid )) {

			return true;

		}

		return false;

	}

}
?>
